<?php
/*
Description: This file is used to change login paassword.
*/
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

//    CHANGE PASSWORD    CODE    //           
if( $_POST['submit']=='Submit')
{    
    $parms['description'] = $_POST['description'];
    $parms['name'] = $_POST['name'];
    $parms['reward_point'] = $_POST['reward_point'];
    
    // upload and create thumb of the image //
    if( !empty( $_FILES['image'] ) ){
        $filename  = 'image';     //  this is name of the control you are using in html form         
        $uploadedfile = CommonUtility::uploadNcreateThumb($filename, $module='gifts', true, 100);
        if( $uploadedfile!= -1 )    {
            $parms['image'] = $uploadedfile;//$_POST['package_image'];
        }        
    }
    
    
    if( CommonUtility::insertData($parms, 'gifts')) {        
        header("Location: gift_mng.php?msg=1154");            
        exit;
    }
    $err = 1155;    
}

//    END CHANGE PASSWORD CODE    //
$errMsg = $err;
$_tplName = 'gifts/gift_add.tpl';
$_title = 'Add Gift';
require_once _ADMIN_TPL_MAIN_;
?>